# FROM anietof/oracle-12c-initialized:latest
FROM oracle-12c:latest

ADD instantclient /opt/instantclient/
ADD oracle /opt/oracle/oracle
ADD run.sh /docker-entrypoint-initdb.d/run.sh
ADD entrypoint.sh /entrypoint.sh

ENV LD_LIBRARY_PATH=/opt/instantclient

# USER root

RUN mkdir -p /usr/local/datakit/externals \
  && chown -R oracle:dba /usr/local/datakit/externals \
  && chown -R oracle:dba /u01/app/oracle \
  && chown -R oracle:dba /docker-entrypoint-initdb.d \
  && chown -R oracle:dba /entrypoint.sh

# USER oracle

ENTRYPOINT ["/entrypoint.sh"]
